package com.nts.bupna.model;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Sequence implements Activity, Container<Activity>, Iterable<Activity> {

    private final List<Activity> children = new ArrayList<Activity>();

    public List<Activity> getChildren() {
        return children;
    }

    @Override
    public String toString() {
        return "Sequence [children=" + children + "]";
    }

    @Override
    public void add(final Activity activity) {
        children.add(activity);
    }

    @Override
    public ActivityType getActivityType() {
        return ActivityType.SEQUENCE;
    }

    @Override
    public Iterator<Activity> iterator() {
        return children.iterator();
    }
}
